package 进制转换.二进制中1的个数;

public class ejzz1dgs {
    public static void main(String[] args) {
        System.out.println(hammingWeight(-3));
    }
    public static int hammingWeight(int n) {
          return Integer.bitCount(n);
    }
}
